package com.ruoyi.paper.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.paper.mapper.ExamStudentPaperMapper;
import com.ruoyi.paper.domain.ExamStudentPaper;
import com.ruoyi.paper.service.IExamStudentPaperService;
import com.ruoyi.common.core.text.Convert;

/**
 * 考生答卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class ExamStudentPaperServiceImpl implements IExamStudentPaperService 
{
    @Autowired
    private ExamStudentPaperMapper examStudentPaperMapper;

    /**
     * 查询考生答卷
     * 
     * @param studentPaperId 考生答卷主键
     * @return 考生答卷
     */
    @Override
    public ExamStudentPaper selectExamStudentPaperByStudentPaperId(String studentPaperId)
    {
        return examStudentPaperMapper.selectExamStudentPaperByStudentPaperId(studentPaperId);
    }

    /**
     * 查询考生答卷列表
     * 
     * @param examStudentPaper 考生答卷
     * @return 考生答卷
     */
    @Override
    public List<ExamStudentPaper> selectExamStudentPaperList(ExamStudentPaper examStudentPaper)
    {
        return examStudentPaperMapper.selectExamStudentPaperList(examStudentPaper);
    }

    /**
     * 新增考生答卷
     * 
     * @param examStudentPaper 考生答卷
     * @return 结果
     */
    @Override
    public int insertExamStudentPaper(ExamStudentPaper examStudentPaper)
    {
        return examStudentPaperMapper.insertExamStudentPaper(examStudentPaper);
    }

    /**
     * 修改考生答卷
     * 
     * @param examStudentPaper 考生答卷
     * @return 结果
     */
    @Override
    public int updateExamStudentPaper(ExamStudentPaper examStudentPaper)
    {
        return examStudentPaperMapper.updateExamStudentPaper(examStudentPaper);
    }

    /**
     * 批量删除考生答卷
     * 
     * @param studentPaperIds 需要删除的考生答卷主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentPaperByStudentPaperIds(String studentPaperIds)
    {
        return examStudentPaperMapper.deleteExamStudentPaperByStudentPaperIds(Convert.toStrArray(studentPaperIds));
    }

    /**
     * 删除考生答卷信息
     * 
     * @param studentPaperId 考生答卷主键
     * @return 结果
     */
    @Override
    public int deleteExamStudentPaperByStudentPaperId(String studentPaperId)
    {
        return examStudentPaperMapper.deleteExamStudentPaperByStudentPaperId(studentPaperId);
    }
}
